#ifndef MEMBERSMENU_H
#define MEMBERSMENU_H

#include <vector>

#include "menu.h"
#include "members.h"
#include "student.h"
#include "uniprof.h"
#include "otheruni.h"
#include "otherpeople.h"

class MembersMenu : public Menu
{
	public:
	enum Exceptions{FAILNAME,FAILID,NOTINTEGER,NOTEXIST,HASBOOK};
	
	MembersMenu(){std::string str = "Data/members.txt"; Load(_member,member,str);}
	~MembersMenu()
	{
		std::string str("Data/members.txt"); Save(member,str);
		
		for (std::vector<LibMember*>::const_iterator it = member.begin(); it!=member.end(); ++it)
			delete *it;
	}
	
	void Run();
	
	void NewBook(LibMember*);
	void ChooseStatus(std::string msg,std::string &status, int &number);
	void DeleteMember();
	void Memberslist() const;
	void MemberData();
	
	void ModifyMember();	
	LibMember* &SelectMember(int);
	void WriteOptions() const;
	
	void OwingMembers() const;
	
	private:
	LibMember* _member;
	std::vector<LibMember*> member;
	
	void MenuWrite() const;
	
};

#endif